package product;

public class Movie {
    private String name, director, actors, intro;
    private int duration;
    private double score;
    private boolean isShowing;

    public Movie(String name, String director, String actors, String intro,
                 int duration, double score, boolean isShowing) {
        this.name = name;
        this.director = director;
        this.actors = actors;
        this.intro = intro;
        this.duration = duration;
        this.score = score;
        this.isShowing = isShowing;
    }

    public void display() {
        System.out.printf("片名:%s 导演:%s 主演:%s 简介:%s 时长:%d 评分:%.1f 状态:%s%n",
                name, director, actors, intro, duration, score, isShowing ? "上映中" : "未上映");
    }

    // Getters and Setters
    public String getName() { return name; }
    public String getDirector() { return director; }
    public String getActors() { return actors; }
    public String getIntro() { return intro; }
    public int getDuration() { return duration; }
    public double getScore() { return score; }
    public boolean isShowing() { return isShowing; }
    public void setShowing(boolean b) { isShowing = b; }
    public void setDirector(String d) { director = d; }
    public void setActors(String a) { actors = a; }
    public void setIntro(String i) { intro = i; }
    public void setDuration(int d) { duration = d; }
    public void setScore(double s) { score = s; }
}